/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package am.aua.renju.web;

import am.aua.renju.databaseaccess.GameOperations;
import am.aua.renju.databaseaccess.Operations;
import am.aua.renju.databaseaccess.UserOperations;
import javax.servlet.ServletContextEvent;
import javax.servlet.annotation.WebListener;

/**
 *
 * @author ara
 */
@WebListener
public class RenjuServletContexListener implements javax.servlet.ServletContextListener{

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        Operations.getInstance();
        GameOperations.getInstance();
        UserOperations.getInstance();
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        Operations.getInstance().close();
        GameOperations.getInstance().close();
        UserOperations.getInstance().close();
    }
    
}
